<?	session_start(); 
	if(isset($_SESSION['id']) & isset($_SESSION['pass']))
	{

	require("koneksi.php");
	$nrp=$_GET["nrp"];
	$kode=$_GET["kode"];
	$query=mysql_query("select * from krs where nrp='$nrp' and kode='$kode'");
	$row=mysql_fetch_row($query);
	
?>	

<form name="" method="POST" action="edit_nilai.php">
	<table>
		<tr>
			<td colspan="3">Menu Edit Nilai Mahasiswa</td>
		</tr>
		<tr>
			<td>NRP</td>
			<td>:</td>
			<td><input name="nrp" type="text" value="<? echo "$row[0]"?>" ></td>
		</tr>
		<tr>
			<td>Kode MK</td>
			<td>:</td>
			<td><input name="kode" type="text" value="<? echo "$row[1]"?>" ></td>
		</tr>
		<tr>
			<td>Status</td>
			<td>:</td>
			<td><input name="status" type="text" value="<? echo "$row[2]"?>" ></td>
		</tr>
		<tr>
			<td>TTT1</td>
			<td>:</td>
			<td><input name="ttt1" type="text" value="<? echo "$row[3]"?>"></td>
		</tr>
		<tr>
			<td>TTT2</td>
			<td>:</td>
			<td><input name="ttt2" type="text" value="<? echo "$row[4]"?>"></td>
		</tr>
		<tr>
			<td>TTT3</td>
			<td>:</td>
			<td><input name="ttt3" type="text" value="<? echo "$row[5]"?>"></td>
		</tr>
		<tr>
			<td>Lain - Lain</td>
			<td>:</td>
			<td><input name="lain" type="text" value="<? echo "$row[6]"?>"></td>
		</tr>
		<tr>
			<td>UTS</td>
			<td>:</td>
			<td><input name="uts" type="text" value="<? echo "$row[7]"?>"></td>
		</tr>
		<tr>
			<td>UAS</td>
			<td>:</td>
			<td><input name="uas" type="text" value="<? echo "$row[8]"?>"></td>
		</tr>
		
		<tr>
			<td>Grade</td>
			<td>:</td>
			<td><input name="grade" type="text" value="<? echo "$row[9]"?>"></td>
		</tr>
		<tr>
			<td>SKS</td>
			<td>:</td>
			<td><input name="sks" type="text" value="<? echo "$row[10]"?>"></td>
		</tr>
		<tr>
			<td>Periode</td>
			<td>:</td>
			<td><input name="periode" type="text" value="<? echo "$row[11]"?>"></td>
		</tr>
		<tr>
			<td colspan="2"><input name="simpan" type="submit" id="simpan" value="Save"></td>
			<td><input name="reset" type="reset" id="reset" value="Reset"></td>
		</tr>
		
	</table>
	<a href="menu_mahasiswa.php">Back To Menu Mahasiswa</a>
	<br>
	<a href="menu_admin.php">Back to Menu Admin</a>
</form>
<? 
	}
	else
	echo "Silahkan <a href='index.php'>Login</a> dulu.";
?>
